package com.oro.service;

import java.util.List;

import com.oro.domain.Banca;
import com.oro.domain.BankBranch;
import com.oro.domain.Categoria;
import com.oro.domain.Contatto;
import com.oro.domain.Corso;
import com.oro.domain.Iscrizione;
import com.oro.domain.MacroCategoria;
import com.oro.domain.MigrationAgent;
import com.oro.domain.Scuola;
import com.oro.domain.Sede;
import com.oro.domain.Studente;
import com.oro.domain.Traduttore;

public interface StudentService {

	public void delete(Contatto c);

	public void delete(Corso course);

	public void delete(Iscrizione enr);

	public void delete(Scuola school);

	public void delete(Studente stud);

	public void deleteBranches();

	public void deleteContact(Long id);

	public void deleteCourse(Long id);

	public void deleteCourses();

	public void deleteIscrizione(Long id);

	public void deleteSchool(Long id);

	public void deleteSchools();

	public void deleteStudent(Long id);

	public Sede getBranch(Long id);

	public List<Sede> getBranches();

	public List<Categoria> getCategories();

	public List<Categoria> getCategoriesByMacroCategoryId(Long id);

	/**
	 * Return the list of categories of courses offered by a given school.
	 * 
	 * @param schoolId
	 * @return
	 */
	public List<Categoria> getCategoriesBySchool(Long schoolId);

	public Categoria getCategory(Long id);

	public List<Contatto> getContacts();

	public List<Contatto> getContactsByBranch(Sede s);

	public List<Contatto> getContactsByName(String name);

	public List<Contatto> getContactsByPhone(String number);

	/**
	 * 
	 * @param s
	 * @return the contacts of the School only , excluding its branches' ones.
	 */
	public List<Contatto> getContactsBySchool(Scuola s);

	public List<Contatto> getContactsByStudent(Studente stud);

	public List<Contatto> getContactsBySurname(String surname);

	public Contatto getContatto(Long id);

	public Corso getCorso(Long id);

	public List<Corso> getCourses();

	public List<Corso> getCoursesByBranch(Sede s);

	public List<Corso> getCoursesByCategory(String category);

	public List<Corso> getCoursesByMacroCategory(String macroCategory);

	public List<Corso> getCoursesByName(String name);

	public List<Corso> getCoursesBySchool(Scuola s);

	public List<Corso> getCoursesByState(String state);

	public List<Corso> getCoursesByTown(String town);

	public Iscrizione getEnrollment(Long id);

	public List<Iscrizione> getEnrollments();

	public List<Iscrizione> getEnrollmentsByBranch(Sede s);

	public List<Iscrizione> getEnrollmentsByCourse(Corso c);

	public List<Iscrizione> getEnrollmentsBySchool(Scuola s);

	public List<Iscrizione> getEnrollmentsByStudent(Studente stud);

	public List<MacroCategoria> getMacroCategories();

	public Scuola getSchool(Long id);

	/**
	 * 
	 * @param id
	 * @param eager
	 *            : when set true, the lazy collections are populated
	 *            recursively. (useful for edit and view pages)
	 * @return
	 */
	public Scuola getSchool(Long id, boolean eager);

	public List<Scuola> getSchools();

	public List<Scuola> getSchoolsByCourseCategory(Long id);

	public List<Scuola> getSchoolsByCourseCategory(String category);

	public List<Scuola> getSchoolsByCourseMacroCategory(String macroCategory);

	public List<Scuola> getSchoolsByCoursePrice(float min, float max);

	public List<Scuola> getSchoolsByName(String name);

	public List<Scuola> getSchoolsByState(String state);

	public List<Scuola> getSchoolsByTown(String town);

	public List<String> getSchoolsNames();

	public Scuola getScuola(Long id);

	public Studente getStudent(Long id);

	public List<Studente> getStudentiByName(String firstName);

	public List<Studente> getStudentiByPhone(String number);

	public List<Studente> getStudentiBySchool(Scuola school);

	public List<Studente> getStudentiByState(String state);

	public List<Studente> getStudentiBySurname(String surname);

	public List<Studente> getStudentiByTown(String town);

	public List<Studente> getStudents();

	public List<String> getStudentsEmails();

	public List<String> getStudentsEmailsByTown(String studentTown);

	/**
	 * Get the list of student first names in the database. The list is sorted
	 * alphabetically.
	 * 
	 * @return
	 */
	public List<String> getStudentsNames();

	/**
	 * Get the listed of names of students coming from the given Italian town.
	 * The list is sorted alphabetically.
	 * 
	 * @param studentTown
	 * @return
	 */
	public List<String> getStudentsNamesByTown(String studentTown);

	/**
	 * Get the list of student surnames in the database. The list is sorted
	 * alphabetically.
	 * 
	 * @return
	 */
	public List<String> getStudentsSurnames();

	/**
	 * Get the listed of surnames of students coming from the given Italian
	 * town. The list is sorted alphabetically.
	 * 
	 * @param studentTown
	 * @return
	 */
	public List<String> getStudentsSurnamesByTown(String studentTown);

	/**
	 * Get the lists of town names from which at least a student is.
	 * 
	 * @return
	 */
	public List<String> getStudentTowns();

	public List<String> getTownsAu();

	public List<String> getTownsIt();

	public void refresh(Object o);

	public void save(Corso corso);

	public void save(MigrationAgent migrationAgentInput);

	public void save(Scuola school);

	public void save(Sede branch);

	public void save(Studente student);

	public List<Scuola> searchSchools(String schoolName, String schoolTown,
			Long courseCategoryId, float minPrice, float maxPrice);

	public List<Studente> searchStudents(String firstName, String surname,
			String email, String studentTown, Long schoolId,
			Long courseCategoryId);

	public void save(Traduttore translatorInput);

	public void initialize(Object o);

	public void update(Object o);

	public void prepare(Studente studentInput);

	public void prepare(Scuola school);
	
	public Banca getBank(Long id);
	
	public Banca getBankByName(String name);

	public List<String> getBankNames();
	
	public List<Banca> getBanks();

	public void save(Banca bank);

	public void save(BankBranch bankBranch);

	public List<BankBranch> getBankBranches(Banca bank);

	public BankBranch getBankBranch(Long id);
}
